<?php



function getRegion($code) {
	$url = 'http://api.showji.com/Locating/default.aspx?output=json&m=' . $code;

	$r = file_get_contents($url);
	$ret = json_decode($r, true);
	return $ret;
}


$from = $argv[1];
$to = $from + 1000;

for($i = $from; $i < $to; $i ++) {
	$r = getRegion($i);
	echo $r['Mobile']," ", $r['Province'], ' ', $r['City'], ' ', $r['AreaCode'], ' ', $r['PostCode'], ' ', $r['Corp'], ' ', $r['Card'], "\n";
}
